﻿<?php include("template/baglanti.php"); include ("template/upload.php"); include("template/header.php");
$query = "SELECT * FROM products ORDER BY PdID";
$sql = mysql_query($query);


?>
  


<link rel="stylesheet" type="text/css" href="css/main.css" />
 
	<link rel="stylesheet" type="text/css" href="./media/css/jquery.dataTables.css">
	<link rel="stylesheet" type="text/css" href="./resources/syntax/shCore.css">
	<link rel="stylesheet" type="text/css" href="./resources/demo.css">
	<style type="text/css" class="init">

	</style>
	<script type="text/javascript" language="javascript" src="./media/js/jquery.js"></script>
	<script type="text/javascript" language="javascript" src="./media/js/jquery.dataTables.js"></script>
	<script type="text/javascript" language="javascript" src="./resources/syntax/shCore.js"></script>
	<script type="text/javascript" language="javascript" src="./resources/demo.js"></script>
	<script type="text/javascript" language="javascript" class="init">


$(document).ready(function() {
	$('#example').dataTable();
} );


	</script>



<body>



<div class="wrapper">

<div class="menu radius flt">
<?php include("./template/menu.php") ?>
 </div>

<div class="wrapperInside radius flt"> 

<div class="wrapperInsideCapture" style="margin-bottom:20px;"> Products List</div>

<table id="example" class="display" cellspacing="0" width="100%" s>
  <thead>
    <tr>
      <th>Products Category Name</th>
	  <th>Add Products</th>
	  <th>Products List</th>
      <th>Edit</th>
    </tr>
  </thead>
  <tfoot>
  		

    <tr>
      	 <th>Products Category Name</th>
		 <th>Add Products</th>
		 <th>Products List</th>
	     <th>Edit</th>

    </tr>
  </tfoot>
  <tbody>
  <?php while($row = @mysql_fetch_assoc($sql)): ?>
    <tr>

<td>

	<?php
		    $ctID = $row['categori_id'];
            $cns = ("SELECT * FROM `categori` WHERE `categori_id` = '$ctID' ");
			$cn = mysql_query($cns);
			$cnl = mysql_fetch_assoc($cn);	
	?>
<span style="color:#cc3333;" ><?=$cnl['categori_name']?></span> <span style="color:#99cc66;"> I </span> <?=$row['Pdname']?>

</td>
<td><a href="productsGaleryAdd.php?id=<?= $row['PdID']?>&ctID=<?=$row['categori_id']?>">  <img src="images/photoAdd.png" >  </a> </td>
<td><a href="productsGaleryShow.php?id=<?= $row['PdID']?>&ctID=<?=$row['categori_id']?>">  <img src="images/photoshow.png" >  </a> </td>
<td><a href="productsEdit.php?id=<?= $row['PdID']?>&ctID=<?=$row['categori_id']?>">  <img src="images/edit.png" >  </a></td>

       <?php endwhile; ?>
    </tr>

  </tbody>
</table>

   
</div>


</div>
</div>


<?php include("template/footer.php") ?>



